1. Technical Field
The present invention relates in general to scripting in component software architectures and in particular to supporting event connections in scripting objects within a component software architecture such as Java. Still more particularly, the present invention relates to providing a generic event listener for arbitrary events generated in an arbitrary manner by scriptable objects within a component software architecture.
2. Description of the Related Art
Component software architectures and rapid application development (RAD) tools are increasingly proliferating. Component software architectures employ discrete software components to quickly prototype and flesh out interactive applications. Applications are built by combining a set of independent components with developer-written code which acts as a "glue" between components, usually responding directly to component events by setting component properties or invoking component methods. One currently popular component software architecture is the Java Bean specification of the Java programming language.
Developed by Sun Microsystems, the portability, security, and intrinsic distributed programming support features of the Java programming language make this language useful for Internet programming. Java is a totally object-oriented, platform independent programming language, which achieves architectural independence by compiling source code into its own intermediate representation. Java source code is not compiled into normal machine code, but is translated into code for a virtual machine specifically designed to support Java's features. A Java interpreter or a Java-enabled browser then executes the translated code. While Java source code must be compiled, no link step is required since the Java interpreter dynamically links the translated code at run time.
Java Beans is a component model for building and using Java-based software components. A "bean" is simply a Java class with extra descriptive information, similar to the concept of an OLE-type library. Unlike an OLE library, however, a bean is usually self-describing, including a file which contains the class's symbol information and method signatures and which may be scanned by a development tool to gather information about the bean, a process referred to as introspection. Any Java class with public methods may be considered a bean, but a bean typically has properties and events as well as methods.
In scripting components--writing executable scripts connecting various components--within a component software architecture such as Java beans, events fired by scriptable objects must be connected to the appropriate executable script code. However, different scriptable objects fire different events, and each event may have an arbitrary number and type of parameters which may or may not be defined in the software component architecture. For example, in the Java event model (which is a callback model in which components register for notification with the object expected to fire the event) there is no generic event listener which would act as a sink to any arbitrary event that a bean may fire. Most applications using the Java event model implement a set of custom listeners to listen for events which a bean may fire.
It would be desirable, therefore, to have a generic event listener connected to scriptable objects which listens for arbitrary events. It would further be advantageous for the event listener to allow events to be generated in an arbitrary manner, rather than in a specific format, and to pass events between a source and sink without them knowing about each other.